<?php
include 'inc/common.inc.php';
include 'MSummary.class.php';

class Controller extends BaseController
{
	public $gatherId;
	
	public function informInitialize()
	{
		$gatherId = $this->get_request("gatherId");		/*需要接收传过来的request,包含聚会id*/
		$this->gatherId = $gatherId;
		$db = new MSummary();
		$item = $db->selectInformation($gatherId);
		return $item;
	}
	
	public function clearCookieAction()
	{
		parent::clearCookie();
		$this->_msg->set(array("desc"=>"清理cookie成功","return_code"=>1));
		echo $this->_msg;
	}
}

$control = new Controller();
$control->run();
$dbCheck = new MCheckUser();
if(!$control->get_action_name() && $dbCheck->checkUserCookie())
{
	$information = $control->informInitialize();
	include template('summary.html');
}else if(!$control->get_action_name() && !$dbCheck->checkUserCookie())
{
	header("Location: index.php");
}
